﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Dal;
using Entities;
using UnityCommon;

namespace SnS.Sns
{
    public partial class AddImports : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                TextBox1.Text = Common.GetId();
            }
        }

        protected void Button1_OnClick(object sender, EventArgs e)
        {
            Imports imp = new Imports();

            imp.ID_IMPORTS = TextBox1.Text;

            imp.GoodsName = TextBox2.Text;

            ImportBll bll = new ImportBll();

            var result = bll.InsertSingle(imp);

            if (result > 0)
            {
                Response.Redirect("Import.aspx");
            }
        }
    }
}